package cn.wolfcode.trip.base.domain;


import cn.wolfcode.trip.base.util.JSONUtil;
import lombok.*;

import java.util.HashMap;

@Setter
@Getter
@ToString
@NoArgsConstructor
@AllArgsConstructor
//大攻略分类

public class StrategyCatalog extends BaseDomain{

    public static final boolean STATE_ENABLE = true; //启用
    public static final boolean STATE_DISABLE = false; //禁用

    private String name;
    //攻略id、title
    private Long strategyId;
    private String strategyTitle;
    //序列
    private Integer sequence;

    private boolean state=STATE_ENABLE;


    public String getStateName() {
        return state==STATE_ENABLE? "启用" : "禁用";
    }


    public String getJson() {
        HashMap<String, Object> map = new HashMap<>();
        map.put("id", id);
        map.put("name", name);
        map.put("strategyId", strategyId);
        map.put("sequence", sequence);
        map.put("state", state);
        return JSONUtil.toJSONString(map);
    }


}